﻿using System.Collections.Generic;
using ControleRepresentante.Common;
using ControleRepresentante.Logic.Models;
using WebSite.ViewModels.Fields;

namespace WebSite.ViewModels.DetailsViewModels
{
    public class AttributeDetailsViewModel : DetailsViewModel
    {
        public AttributeDetailsViewModel()
            : base("Atributo")
        {
            
        }

        protected override IEnumerable<IField> GetGeralFields()
        {
            Attribute attribute = (Attribute) Model;
            List<IField> result = new List<IField>
            {
                new LabelField("Tipo", "tipo", attribute.Type.GetDescription()),
                new LabelField("Nome", "tipo", attribute.Name),
            };
            result.AddRange(base.GetGeralFields());
            return result;
        }
    }
}